package com.learnJava;

import java.io.PrintStream;
import java.util.*;

public class Trans {
    public static void main(String[] arg) {
        int a = new Integer("75");
        tranF(a);
        System.out.println(a);
        int[] b = new int[]{1, 2, 3};
        int[] c = new int[]{2, 1, 3};
        Arrays.sort(c);//好用的Arrays类！
        System.out.println(b.equals(c));
        System.out.println(Arrays.equals(b, c));//比较两个数组是否相等
        Stack<String> st = new Stack<>();
        Queue<String> qu = new LinkedList<>();
        PrintStream ps = System.out;
        ps.println("输入输出");
        HashSet<Integer> hs = new HashSet<>();
        hs.contains(1);
        int[] array = new int[4];
        int len = array.length;
        int[][] envelopes = new int[2][2];
        envelopes[0][0] = 3;
        envelopes[0][1] = 2;
        envelopes[1][0] = 5;
        envelopes[1][1] = 1;

        Arrays.sort(envelopes, new Comparator<int[]>() {
            @Override
            public int compare(int[] e1, int[] e2) {
                return Integer.compare(e1[0] * e1[1], e2[0] * e2[1]);
            }
        });
        System.out.println("" + envelopes[0][0] + envelopes[0][1]);
    }

    private static void tranF(int a) {
        //java中的参数传递方法只有：值传递！
        a = 3;
        System.out.println(a);
        return;
    }
}
